.class public Lcom/inmobi/re/configs/Initializer;
.super Ljava/lang/Object;
.source "Initializer.java"


# static fields
.field public static final PRODUCT_MRAID:Ljava/lang/String; = "mraid"

.field public static final PRODUCT_RENDERING:Ljava/lang/String; = "rendering"

.field private static a:Landroid/content/Context;

.field private static b:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private static c:Lcom/inmobi/re/configs/ConfigParams;

.field private static d:Lcom/inmobi/commons/cache/CacheController$Validator;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 19
    const/4 v0, 0x0

    sput-object v0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    .line 20
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/inmobi/re/configs/Initializer;->b:Ljava/util/Map;

    .line 26
    new-instance v0, Lcom/inmobi/re/configs/ConfigParams;

    invoke-direct {v0}, Lcom/inmobi/re/configs/ConfigParams;-><init>()V

    sput-object v0, Lcom/inmobi/re/configs/Initializer;->c:Lcom/inmobi/re/configs/ConfigParams;

    .line 27
    new-instance v0, Lcom/inmobi/re/configs/a;

    invoke-direct {v0}, Lcom/inmobi/re/configs/a;-><init>()V

    sput-object v0, Lcom/inmobi/re/configs/Initializer;->d:Lcom/inmobi/commons/cache/CacheController$Validator;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 18
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static a(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter

    .prologue
    .line 72
    sget-object v0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/inmobi/re/configs/Initializer;->c(Landroid/content/Context;)V

    .line 74
    :try_start_0
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2

    .line 78
    :try_start_1
    const-string v0, "common"

    invoke-virtual {v2, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v0

    move-object v1, v0

    .line 84
    :goto_0
    :try_start_2
    const-string v0, "AND"

    invoke-virtual {v2, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    move-result-object v0

    .line 89
    :goto_1
    const/4 v2, 0x1

    :try_start_3
    invoke-static {v0, v1, v2}, Lcom/inmobi/commons/internal/InternalSDKUtil;->populateToNewJSON(Lorg/json/JSONObject;Lorg/json/JSONObject;Z)Lorg/json/JSONObject;

    move-result-object v0

    .line 90
    sget-object v1, Lcom/inmobi/re/configs/Initializer;->c:Lcom/inmobi/re/configs/ConfigParams;

    invoke-virtual {v1, v0}, Lcom/inmobi/re/configs/ConfigParams;->setFromJSON(Lorg/json/JSONObject;)V

    .line 91
    sget-object v0, Lcom/inmobi/re/configs/Initializer;->c:Lcom/inmobi/re/configs/ConfigParams;

    invoke-virtual {v0}, Lcom/inmobi/re/configs/ConfigParams;->toJSON()Lorg/json/JSONObject;

    move-result-object v0

    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v0

    .line 95
    :goto_2
    return-object v0

    .line 79
    :catch_0
    move-exception v0

    .line 80
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    move-object v1, v0

    goto :goto_0

    .line 85
    :catch_1
    move-exception v0

    .line 86
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_2

    goto :goto_1

    .line 92
    :catch_2
    move-exception v0

    .line 93
    const-string v1, "IMRE_3.7.0"

    const-string v2, "Config couldn\'t be parsed"

    invoke-static {v1, v2, v0}, Lcom/inmobi/commons/internal/Log;->debug(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 95
    const/4 v0, 0x0

    goto :goto_2
.end method

.method private static a(Landroid/content/Context;)V
    .locals 3
    .parameter

    .prologue
    .line 41
    if-eqz p0, :cond_2

    sget-object v0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    if-nez v0, :cond_2

    .line 42
    sget-object v0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    if-eqz v0, :cond_1

    .line 54
    :cond_0
    :goto_0
    return-void

    .line 44
    :cond_1
    sput-object p0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    .line 45
    invoke-static {p0}, Lcom/inmobi/re/configs/Initializer;->c(Landroid/content/Context;)V

    .line 47
    :try_start_0
    const-string v0, "rendering"

    sget-object v1, Lcom/inmobi/re/configs/Initializer;->b:Ljava/util/Map;

    sget-object v2, Lcom/inmobi/re/configs/Initializer;->d:Lcom/inmobi/commons/cache/CacheController$Validator;

    invoke-static {v0, p0, v1, v2}, Lcom/inmobi/commons/cache/CacheController;->getConfig(Ljava/lang/String;Landroid/content/Context;Ljava/util/Map;Lcom/inmobi/commons/cache/CacheController$Validator;)Lcom/inmobi/commons/cache/ProductConfig;

    move-result-object v0

    invoke-virtual {v0}, Lcom/inmobi/commons/cache/ProductConfig;->getData()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/inmobi/re/configs/Initializer;->a(Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Lcom/inmobi/commons/internal/CommonsException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 49
    :catch_0
    move-exception v0

    goto :goto_0

    .line 52
    :cond_2
    sget-object v0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    if-nez v0, :cond_0

    if-nez p0, :cond_0

    .line 53
    new-instance v0, Ljava/lang/NullPointerException;

    invoke-direct {v0}, Ljava/lang/NullPointerException;-><init>()V

    throw v0
.end method

.method private static b(Landroid/content/Context;)V
    .locals 3
    .parameter

    .prologue
    .line 57
    invoke-static {p0}, Lcom/inmobi/re/configs/Initializer;->a(Landroid/content/Context;)V

    .line 60
    :try_start_0
    const-string v0, "rendering"

    sget-object v1, Lcom/inmobi/re/configs/Initializer;->b:Ljava/util/Map;

    sget-object v2, Lcom/inmobi/re/configs/Initializer;->d:Lcom/inmobi/commons/cache/CacheController$Validator;

    invoke-static {v0, p0, v1, v2}, Lcom/inmobi/commons/cache/CacheController;->getConfig(Ljava/lang/String;Landroid/content/Context;Ljava/util/Map;Lcom/inmobi/commons/cache/CacheController$Validator;)Lcom/inmobi/commons/cache/ProductConfig;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 65
    :goto_0
    return-void

    .line 62
    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method private static c(Landroid/content/Context;)V
    .locals 2
    .parameter

    .prologue
    .line 68
    sget-object v0, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    sget-object v1, Lcom/inmobi/re/configs/Initializer;->c:Lcom/inmobi/re/configs/ConfigParams;

    invoke-virtual {v1}, Lcom/inmobi/re/configs/ConfigParams;->getUID()Lcom/inmobi/commons/uid/UID;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/inmobi/commons/uid/UIDUtil;->getMap(Landroid/content/Context;Lcom/inmobi/commons/uid/UID;)Ljava/util/Map;

    move-result-object v0

    sput-object v0, Lcom/inmobi/re/configs/Initializer;->b:Ljava/util/Map;

    .line 69
    return-void
.end method

.method public static getConfigParams(Landroid/content/Context;)Lcom/inmobi/re/configs/ConfigParams;
    .locals 1
    .parameter

    .prologue
    .line 36
    invoke-static {p0}, Lcom/inmobi/re/configs/Initializer;->b(Landroid/content/Context;)V

    .line 37
    sget-object v0, Lcom/inmobi/re/configs/Initializer;->c:Lcom/inmobi/re/configs/ConfigParams;

    return-object v0
.end method

.method public static getMRAIDString()Ljava/lang/String;
    .locals 4

    .prologue
    .line 100
    :try_start_0
    const-string v0, "mraid"

    sget-object v1, Lcom/inmobi/re/configs/Initializer;->a:Landroid/content/Context;

    sget-object v2, Lcom/inmobi/re/configs/Initializer;->b:Ljava/util/Map;

    new-instance v3, Lcom/inmobi/re/configs/Initializer$a;

    invoke-direct {v3}, Lcom/inmobi/re/configs/Initializer$a;-><init>()V

    invoke-static {v0, v1, v2, v3}, Lcom/inmobi/commons/cache/CacheController;->getConfig(Ljava/lang/String;Landroid/content/Context;Ljava/util/Map;Lcom/inmobi/commons/cache/CacheController$Validator;)Lcom/inmobi/commons/cache/ProductConfig;

    move-result-object v0

    invoke-virtual {v0}, Lcom/inmobi/commons/cache/ProductConfig;->getData()Ljava/lang/String;

    move-result-object v0

    .line 106
    if-eqz v0, :cond_0

    const-string v1, ""
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    if-eq v0, v1, :cond_0

    .line 111
    :goto_0
    return-object v0

    .line 109
    :catch_0
    move-exception v0

    .line 111
    :cond_0
    const-string v0, "var EventListeners=function(e){this.event=e;this.count=0;var t={};this.add=function(e){var n=String(e);if(!t[n]){t[n]=e;this.count++}};this.remove=function(e){var n=String(e);if(t[n]){t[n]=null;delete t[n];this.count--;return true}else{return false}};this.removeAll=function(){for(var e in t)this.remove(t[e])};this.broadcast=function(e){for(var n in t){t[n].apply({},e)}};this.toString=function(){var n=[e,\":\"];for(var r in t)n.push(\"|\",r,\"|\");return n.join(\"\")}};var InmobiObj=function(){this.listeners=[];this.addEventListener=function(e,t){try{if(typeof t!=\"undefined\"&&t!=null&&typeof e!=\"undefined\"&&e!=null){var n=this.listeners;if(!n[e]){n[e]=new EventListeners}n[e].add(t)}}catch(r){this.log(r)}if(\"micIntensityChange\"==e){mraidview.registerMicListener()}};this.removeEventListener=function(e,t){if(typeof t!=\"undefined\"&&t!=null&&typeof e!=\"undefined\"&&e!=null){var n=this.listeners;if(n[e]){n[e].remove(t)}if(\"micIntensityChange\"==e){if(n[e].count==0)mraidview.unRegisterMicListener()}}};this.broadcastEvent=function(e){if(typeof e!=\"undefined\"&&e!=null){var t=new Array(arguments.length);for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}var e=t.shift();try{if(this.listeners[e]){this.listeners[e].broadcast(t)}}catch(r){}}}};(function(){var mraidview=window.mraidview={};var listeners={};var commandQueue=[];var activeCommand=false;mraidview.fireGalleryImageSelectedEvent=function(e,t,n){var r=new Image;var i=\"data:image/jpeg;base64,\"+e;r.src=i;r.width=t;r.height=n;window.mraid.broadcastEvent(\"galleryImageSelected\",r);return\"OK\"};mraidview.fireCameraPictureCatpturedEvent=function(e,t,n){var r=new Image;var i=\"data:image/jpeg;base64,\"+e;r.src=i;r.width=t;r.height=n;window.mraid.broadcastEvent(\"cameraPictureCaptured\",r);return\"OK\"};mraidview.firePostStatusEvent=function(e){window.mraid.broadcastEvent(\"postStatus\",e);return\"OK\"};mraidview.fireMediaTrackingEvent=function(e,t){var n={};n.name=e;var r=\"inmobi_media_\"+e;if(typeof t!=\"undefined\"&&t!=null&&t!=\"\"){r=r+\"_\"+t}window.mraid.broadcastEvent(r,evt);return\"OK\"};mraidview.fireMediaErrorEvent=function(e,t){var n={};n.name=\"error\";n.code=t;var r=\"inmobi_media_\"+n.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){r=r+\"_\"+e}window.mraid.broadcastEvent(r,n);return\"OK\"};mraidview.fireMediaTimeUpdateEvent=function(e,t,n){var r={};r.name=\"timeupdate\";r.target={};r.target.currentTime=t;r.target.duration=n;var i=\"inmobi_media_\"+r.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){i=i+\"_\"+e}window.mraid.broadcastEvent(i,evt);return\"OK\"};mraidview.fireMediaCloseEvent=function(e,t,n){var r={};r.name=\"close\";r.viaUserInteraction=t;r.target={};r.target.currentTime=n;var i=\"inmobi_media_\"+r.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){i=i+\"_\"+e}window.mraid.broadcastEvent(i,evt);return\"OK\"};mraidview.fireMediaVolumeChangeEvent=function(e,t,n){var r={};r.name=\"volumechange\";r.target={};r.target.volume=t;r.target.muted=n;var i=\"inmobi_media_\"+r.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){i=i+\"_\"+e}window.mraid.broadcastEvent(i,evt);return\"OK\"};mraidview.showAlert=function(e){utilityController.showAlert(e)};mraidview.zeroPad=function(e){var t=\"\";if(e<10){t+=\"0\"}t+=e;return t};mraidview.useCustomClose=function(e){try{displayController.useCustomClose(e)}catch(t){mraidview.showAlert(\"use CustomClose: \"+t)}};mraidview.close=function(){try{displayController.close()}catch(e){mraidview.showAlert(\"close: \"+e)}};mraidview.stackCommands=function(command,isExpand){if(!activeCommand){eval(command);if(isExpand){activeCommand=true}}else{commandQueue.push(command)}};mraidview.executeStack=function(){activeCommand=false;while(commandQueue.length>0){var cmd=commandQueue.shift();eval(cmd)}};mraidview.emptyStack=function(){while(commandQueue.length>0){commandQueue.shift()}};mraidview.expand=function(e){try{displayController.expand(e)}catch(t){mraidview.showAlert(\"executeNativeExpand: \"+t+\", URL = \"+e)}};mraidview.setExpandProperties=function(e){try{if(e){this.props=e}else{e=null}displayController.setExpandProperties(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"executeNativesetExpandProperties: \"+t+\", props = \"+e)}};mraidview.getExpandProperties=function(){try{return eval(\"(\"+displayController.getExpandProperties()+\")\")}catch(e){mraidview.showAlert(\"getExpandProperties: \"+e)}};mraidview.setOrientationProperties=function(e){try{if(e){this.orientationProps=e}else{e=null}displayController.setOrientationProperties(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"executeNativesetOrientationProperties: \"+t+\", props = \"+e)}};mraidview.resizeProps=null;mraidview.setResizeProperties=function(e){var t,n;try{t=parseInt(e.width);n=parseInt(e.height);if(isNaN(t)||isNaN(n)||t<1||n<1){throw\"Invalid\"}e.width=t;e.height=n;mraidview.resizeProps=e;displayController.setResizeProperties(mraidview.stringify(e))}catch(r){window.mraid.broadcastEvent(\"error\",\"Invalid properties.\",\"setResizeProperties\")}};mraidview.acceptAction=function(e){try{displayController.acceptAction(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"acceptAction: \"+t+\", params = \"+e)}};mraidview.rejectAction=function(e){try{displayController.rejectAction(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"rejectAction: \"+t+\", params = \"+e)}};mraidview.open=function(e){if(typeof e==\"undefined\")e=null;try{displayController.open(e)}catch(t){mraidview.showAlert(\"open: \"+t)}};mraidview.openExternal=function(e){try{utilityController.openExternal(e)}catch(t){mraidview.showAlert(\"openExternal: \"+t)}};mraidview.getScreenSize=function(){try{return eval(\"(\"+utilityController.getScreenSize()+\")\")}catch(e){mraidview.showAlert(\"getScreenSize: \"+e)}};mraidview.getMaxSize=function(){try{return eval(\"(\"+utilityController.getMaxSize()+\")\")}catch(e){mraidview.showAlert(\"getMaxSize: \"+e)}};mraidview.getCurrentPosition=function(){try{return eval(\"(\"+utilityController.getCurrentPosition()+\")\")}catch(e){mraidview.showAlert(\"getCurrentPosition: \"+e)}};mraidview.getDefaultPosition=function(){try{return eval(\"(\"+utilityController.getDefaultPosition()+\")\")}catch(e){mraidview.showAlert(\"getDefaultPosition: \"+e)}};mraidview.getState=function(){try{return String(displayController.getState())}catch(e){mraidview.showAlert(\"getState: \"+e)}};mraidview.getOrientation=function(){try{return String(displayController.getOrientation())}catch(e){mraidview.showAlert(\"getOrientation: \"+e)}};mraidview.isViewable=function(){try{return displayController.isViewable()}catch(e){mraidview.showAlert(\"isViewable: \"+e)}};mraidview.log=function(e){try{utilityController.log(e)}catch(t){mraidview.showAlert(\"log: \"+t)}};mraidview.getPlacementType=function(){return displayController.getPlacementType()};mraidview.asyncPing=function(e){try{utilityController.asyncPing(e)}catch(t){mraidview.showAlert(\"asyncPing: \"+t)}};mraidview.close=function(){try{displayController.close()}catch(e){mraidview.showAlert(\"close: \"+e)}};mraidview.makeCall=function(e){try{utilityController.makeCall(e)}catch(t){mraidview.showAlert(\"makeCall: \"+t)}};mraidview.sendMail=function(e,t,n){try{utilityController.sendMail(e,t,n)}catch(r){mraidview.showAlert(\"sendMail: \"+r)}};mraidview.sendSMS=function(e,t){try{utilityController.sendSMS(e,t)}catch(n){mraidview.showAlert(\"sendSMS: \"+n)}};mraidview.pauseAudio=function(e){try{var t=getPID(e);utilityController.pauseAudio(t)}catch(n){mraidview.showAlert(\"pauseAudio: \"+n)}};mraidview.muteAudio=function(e){try{var t=getPID(e);utilityController.muteAudio(t)}catch(n){mraidview.showAlert(\"muteAudio: \"+n)}};mraidview.unMuteAudio=function(e){try{var t=getPID(e);utilityController.unMuteAudio(t)}catch(n){mraidview.showAlert(\"unMuteAudio: \"+n)}};mraidview.isAudioMuted=function(e){try{var t=getPID(e);return utilityController.isAudioMuted(t)}catch(n){mraidview.showAlert(\"isAudioMuted: \"+n)}};mraidview.setAudioVolume=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.setAudioVolume(n,t)}catch(r){mraidview.showAlert(\"setAudioVolume: \"+r)}};mraidview.getAudioVolume=function(e){try{var t=getPID(e);return utilityController.getAudioVolume(t)}catch(n){mraidview.showAlert(\"getAudioVolume: \"+n)}};mraidview.seekAudio=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.seekAudio(n,t)}catch(r){mraidview.showAlert(\"seekAudio: \"+r)}};mraidview.playAudio=function(e,t){var n=true,r=false,i=\"normal\",s=\"normal\",o=true;var u=\"\";var a=getPID(t);if(e!=null)u=e;if(t!=null){if(typeof t.autoplay!=\"undefined\"&&t.autoplay===false){n=false}if(typeof t.loop!=\"undefined\"&&t.loop===true){r=true}if(typeof t.startStyle!=\"undefined\"&&t.startStyle!=null){i=t.startStyle}if(typeof t.stopStyle!=\"undefined\"&&t.stopStyle!=null){s=t.stopStyle}if(i==\"fullscreen\"){o=true}}try{utilityController.playAudio(u,n,o,r,i,s,a)}catch(f){mraidview.showAlert(\"playAudio: \"+f)}};mraidview.pauseVideo=function(e){try{var t=getPID(e);utilityController.pauseVideo(t)}catch(n){mraidview.showAlert(\"pauseVideo: \"+n)}};mraidview.closeVideo=function(e){try{var t=getPID(e);utilityController.closeVideo(t)}catch(n){mraidview.showAlert(\"closeVideo: \"+n)}};mraidview.hideVideo=function(e){try{var t=getPID(e);utilityController.hideVideo(t)}catch(n){mraidview.showAlert(\"hideVideo: \"+n)}};mraidview.showVideo=function(e){try{var t=getPID(e);utilityController.showVideo(t)}catch(n){mraidview.showAlert(\"showVideo: \"+n)}};mraidview.muteVideo=function(e){try{var t=getPID(e);utilityController.muteVideo(t)}catch(n){mraidview.showAlert(\"muteVideo: \"+n)}};mraidview.unMuteVideo=function(e){try{var t=getPID(e);utilityController.unMuteVideo(t)}catch(n){mraidview.showAlert(\"unMuteVideo: \"+n)}};mraidview.seekVideo=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.seekVideo(n,t)}catch(r){mraidview.showAlert(\"seekVideo: \"+r)}};mraidview.isVideoMuted=function(e){try{var t=getPID(e);return utilityController.isVideoMuted(t)}catch(n){mraidview.showAlert(\"isVideoMuted: \"+n)}};mraidview.setVideoVolume=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.setVideoVolume(n,t)}catch(r){mraidview.showAlert(\"setVideoVolume: \"+r)}};mraidview.getVideoVolume=function(e){try{var t=getPID(e);return utilityController.getVideoVolume(t)}catch(n){mraidview.showAlert(\"getVideoVolume: \"+n)}};mraidview.playVideo=function(e,t){var n=false,r=true,i=true,s=false,o=-99999,u=-99999,a=-99999,f=-99999,l=\"normal\",c=\"exit\";var h=\"\";var p=getPID(t);if(e!=null)h=e;if(t!=null){if(typeof t.audio!=\"undefined\"&&t.audio==\"muted\"){n=true}if(typeof t.autoplay!=\"undefined\"&&t.autoplay===false){r=false}if(typeof t.controls!=\"undefined\"&&t.controls===false){i=false}if(typeof t.loop!=\"undefined\"&&t.loop===true){s=true}if(typeof t.inline!=\"undefined\"&&t.inline!=null){o=t.inline.left;u=t.inline.top}if(typeof t.width!=\"undefined\"&&t.width!=null){a=t.width}else{}if(typeof t.height!=\"undefined\"&&t.height!=null){f=t.height}else{}if(typeof t.startStyle!=\"undefined\"&&t.startStyle!=null){l=t.startStyle}if(typeof t.stopStyle!=\"undefined\"&&t.stopStyle!=null){c=t.stopStyle}if(l==\"fullscreen\"){i=true}o=parseInt(o).toString();u=parseInt(u).toString();a=parseInt(a).toString();f=parseInt(f).toString()}try{utilityController.playVideo(h,n,r,i,s,o,u,a,f,l,c,p)}catch(d){mraidview.showAlert(\"playVideo: \"+d)}};mraidview.updateToPassbook=function(e){window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"updateToPassbook\");mraidview.log(\"Method not supported\")};mraidview.stringify=function(e){if(typeof JSON===\"undefined\"){var t=\"\";var n=e.length;var r;if(typeof n==\"undefined\"){return mraidview.stringifyArg(e)}for(r=0;r<e.length;r++){if(r>0){t=t+\",\"}t=t+mraidview.stringifyArg(e[r])}t=t+\"]\";return t}else{return JSON.stringify(e)}};mraidview.stringifyArg=function(e){var t,n,r,s,o,u;n=typeof e;t=\"\";if(n===\"number\"||n===\"boolean\"){t=t+args}else if(e instanceof Array){t=t+\"[\"+e+\"]\"}else if(e instanceof Object){r=true;t=t+\"{\";for(s in e){if(e[s]!==null){if(!r){t=t+\",\"}t=t+\'\"\'+s+\'\":\';o=typeof e[s];if(o===\"number\"||o===\"boolean\"){t=t+e[s]}else if(typeof e[s]===\"function\"){t=t+\'\"\"\'}else if(e[s]instanceof Object){t=t+this.stringify(args[i][s])}else{t=t+\'\"\'+e[s]+\'\"\'}r=false}}t=t+\"}\"}else{u=e.replace(/\\\\/g,\"\\\\\\\\\");u=u.replace(/\"/g,\'\\\\\"\');t=t+\'\"\'+u+\'\"\'}mraidview.showAlert(\"json:\"+t);return t};getPID=function(e){var t=\"\";if(e!=null&&typeof e.id!=\"undefined\"&&e.id!=null){t=e.id}return t};var curOrientation;var firstCall=true;mraidview.getWindowOrientation=function(){var e=window.orientation;if(e<0)e+=360;return e};var checkOrientation=function(){if(firstCall||mraidview.getWindowOrientation()!==curOrientation){firstCall=false;curOrientation=mraidview.getWindowOrientation();displayController.onOrientationChange();mraid.broadcastEvent(\"orientationChange\",curOrientation)}};mraidview.registerOrientationListener=function(){curOrientation=mraidview.getWindowOrientation();window.addEventListener(\"resize\",checkOrientation,false);window.addEventListener(\"orientationchange\",checkOrientation,false)};mraidview.unRegisterOrientationListener=function(){window.removeEventListener(\"resize\",checkOrientation,false);window.removeEventListener(\"orientationchange\",checkOrientation,false)};mraidview.registerMicListener=function(){utilityController.registerMicListener()};mraidview.unRegisterMicListener=function(){utilityController.unRegisterMicListener()};mraidview.resize=function(){if(mraidview.resizeProps==null){window.mraid.broadcastEvent(\"error\",\"Valid resize dimensions must be provided before calling resize\",\"resize\");return}try{displayController.resize()}catch(e){mraidview.showAlert(\"resize called in bridge\")}};mraidview.vibrate=function(){utilityController.vibrate()};mraidview.takeCameraPicture=function(){utilityController.takeCameraPicture()};mraidview.getGalleryImage=function(){utilityController.getGalleryImage()};mraidview.createCalendarEvent=function(e){if(typeof e!=\"object\")window.mraid.broadcastEvent(\"error\",\"createCalendarEvent method expects parameter\",\"createCalendarEvent\");if(typeof e.start!=\"string\"||typeof e.end!=\"string\"){window.mraid.broadcastEvent(\"error\",\"createCalendarEvent method expects string parameters for start and end dates\",\"createCalendarEvent\");return}if(typeof e.location!=\"string\")e.location=\"\";if(typeof e.description!=\"string\")e.description=\"\";utilityController.createCalendarEvent(e.start,e.end,e.location,e.description)};mraidview.supports=function(e){console.log(\"bridge: supports\");if(typeof e!=\"string\"){window.mraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\"supports\")}else return utilityController.supportsFeature(e)!=\"false\"};mraidview.postToSocial=function(e,t,n,r){e=parseInt(e);if(isNaN(e)){window.mraid.broadcastEvent(\"error\",\"socialType must be an integer\",\"postToSocial\")}if(typeof t!=\"string\")t=\"\";if(typeof n!=\"string\")n=\"\";if(typeof r!=\"string\")r=\"\";utilityController.postToSocial(e,t,n,r)};mraidview.storePicture=function(e){console.log(\"bridge: storePicture\");if(typeof e!=\"string\"){window.mraid.broadcastEvent(\"error\",\"storePicture method expects url as string parameter\",\"storePicture\")}else{if(mraidview.supports(\"storePicture\")){if(!window.confirm(\"Do you want to download the file?\")){window.mraid.broadcastEvent(\"error\",\"Store picture on \"+e+\" was cancelled by user.\",\"storePicture\");return false}return utilityController.storePicture(e)}else window.mraid.broadcastEvent(\"error\",\"Store picture on \"+e+\" was cancelled because it is unsupported in this device/app.\",\"storePicture\")}};window.mraidview.registerOrientationListener()})();(function(){var e=window.mraid=new InmobiObj;var t=window.mraidview;var n={allowOrientationChange:true,forceOrientation:\"none\"};var r=function(e){var t=0;var n=e.length-1;while(t<e.length&&e[t]==\" \"){t++}while(n>t&&e[n]==\" \"){n-=1}return e.substring(t,n+1)};e.useCustomClose=function(e){t.useCustomClose(e)};e.close=function(){t.close()};e.getExpandProperties=function(){return t.getExpandProperties()};e.setExpandProperties=function(e){t.setExpandProperties(e)};e.getResizeProperties=function(){return t.getResizeProperties()};e.setResizeProperties=function(e){t.setResizeProperties(e)};e.getOrientationProperties=function(){return n};e.setOrientationProperties=function(e){n=e;t.setOrientationProperties(n)};e.expand=function(e){t.expand(e)};e.getMaxSize=function(){return t.getMaxSize()};e.getState=function(){return t.getState()};e.getOrientation=function(){return t.getOrientation()};e.isViewable=function(){return t.isViewable()};e.open=function(e){if(!e){this.broadcastEvent(\"error\",\"URL is required.\",\"open\")}else{t.open(e)}};e.resize=function(){t.resize()};e.log=function(e){if(!e){this.broadcastEvent(\"error\",\"message is required.\",\"log\")}else{t.log(e)}};e.getVersion=function(){return\"2.0\"};e.getInMobiAIVersion=function(){return 1.2};e.getPlacementType=function(){return t.getPlacementType()};e.asyncPing=function(e){if(typeof e!=\"string\"){this.broadcastEvent(\"error\",\"URL is required.\",\"asyncPing\")}else{t.asyncPing(e)}};e.makeCall=function(e){if(!e||typeof e!=\"string\"||r(e).length==0){this.broadcastEvent(\"error\",\"Request must provide a number to call.\",\"makeCall\")}else{t.makeCall(e)}};e.sendMail=function(e,n,i){if(!e||typeof e!=\"string\"||r(e).length==0){this.broadcastEvent(\"error\",\"Request must specify a recipient.\",\"sendMail\")}else{t.sendMail(e,n,i)}};e.sendSMS=function(e,n){if(!e||typeof e!=\"string\"||r(e).length==0){this.broadcastEvent(\"error\",\"Request must specify a recipient.\",\"sendSMS\")}else{t.sendSMS(e,n)}};e.playAudio=function(e,n){if(typeof n==\"undefined\"||n==null){if(typeof e==\"string\"){t.playAudio(e,null)}else if(typeof e==\"object\"){t.playAudio(null,e)}else{t.playAudio(null,null)}}else{t.playAudio(e,n)}};e.playVideo=function(e,n){if(typeof n==\"undefined\"||n==null){if(typeof e==\"string\"){t.playVideo(e,null)}else if(typeof e==\"object\"){t.playVideo(null,e)}else{t.playVideo(null,null)}}else{t.playVideo(e,n)}};e.pauseAudio=function(e){t.pauseAudio(e)};e.muteAudio=function(e){t.muteAudio(e)};e.unMuteAudio=function(e){t.unMuteAudio(e)};e.isAudioMuted=function(e){return t.isAudioMuted(e)};e.setAudioVolume=function(e){var n=e.volume;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid volume\",\"setAudioVolume\")}else if(n<0||n>100){this.broadcastEvent(\"error\",\"Request must specify a valid volume value in the range 0..100\",\"setAudioVolume\")}else{t.setAudioVolume(e,n)}};e.getAudioVolume=function(e){return t.getAudioVolume(e)};e.pauseVideo=function(e){t.pauseVideo(e)};e.closeVideo=function(e){t.closeVideo(e)};e.hideVideo=function(e){t.hideVideo(e)};e.showVideo=function(e){t.showVideo(e)};e.muteVideo=function(e){t.muteVideo(e)};e.unMuteVideo=function(e){t.unMuteVideo(e)};e.isVideoMuted=function(e){return t.isVideoMuted(e)};e.setVideoVolume=function(e){var n=e.volume;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid volume\",\"setVideoVolume\")}else if(n<0||n>100){this.broadcastEvent(\"error\",\"Request must specify a valid volume value in the range 0..100\",\"setVideoVolume\")}else{t.setVideoVolume(e,n)}};e.getVideoVolume=function(e){return t.getVideoVolume(e)};e.seekAudio=function(e){var n=e.time;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid time\",\"seekAudio\")}else if(n!=0){this.broadcastEvent(\"error\",\"Cannot seek audio other than 0\",\"seekAudio\")}else{t.seekAudio(e,n)}};e.seekVideo=function(e){var n=e.time;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid time\",\"seekVideo\")}else if(n!=0){this.broadcastEvent(\"error\",\"Cannot seek video other than 0\",\"seekVideo\")}else{t.seekVideo(e,n)}};e.openExternal=function(e){t.openExternal(e)};e.getScreenSize=function(){return t.getScreenSize()};e.getCurrentPosition=function(){return t.getCurrentPosition()};e.updateToPassbook=function(e){t.updateToPassbook(e)};e.acceptAction=function(e){t.acceptAction(e)};e.rejectAction=function(e){t.rejectAction(e)};e.storePicture=function(e){if(!e){this.broadcastEvent(\"error\",\"storePicture URL cannot be null\",\"storePicture\")}else{t.storePicture(e)}};e.vibrate=function(){t.vibrate()};e.takeCameraPicture=function(){t.takeCameraPicture()};e.getMicIntensity=function(){return t.getMicIntensity()};e.postToSocial=function(e,n,r,i){t.postToSocial(e,n,r,i)};e.createCalendarEvent=function(e){if(!e){this.broadcastEvent(\"error\",\"calendar event must be specified\",\"createCalendarEvent\")}else{t.createCalendarEvent(e)}};e.getPlatform=function(){return\"android\"}})();(function(){\"use strict\";var e=window._im_imaiBridge={ios:{}};var t={};e.broadcastEvent=function(){var e=new Array(arguments.length);for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var n=e.shift();try{window.mraid.broadcastEvent(n,e)}catch(r){}};e.getPlatform=function(){return\"android\"};e.getPlatformVersion=function(){return imaiController.getPlatformVersion()};e.log=function(e){imaiController.log(e)};e.openEmbedded=function(e){imaiController.openEmbedded(e)};e.openExternal=function(e){imaiController.openExternal(e)};e.ping=function(e,t){imaiController.ping(e,t)};e.pingInWebView=function(e,t){imaiController.pingInWebView(e,t)};e.ios.openItunesProductView=function(e){this.broadcastEvent(\"error\",\"functionality not supported\",\"openItunesProductView\")};e.ios.updateToPassbook=function(e){this.broadcastEvent(\"error\",\"functionality not supported\",\"updateToPassbook\")}})();(function(){var e=window._im_imaiBridge;window._im_imai=new InmobiObj;window._im_imai.ios=new InmobiObj;var t=window._im_imai;t.matchString=function(e,t){if(typeof e!=\"string\"||e==null){return-1}if(t==null){return-1}var n=-1;try{n=e.indexOf(t)}catch(r){}return n};t.isHttpUrl=function(e){if(typeof e!=\"string\"||e==null){return false}if(t.matchString(e,\"http://\")==0){return true}else{if(t.matchString(e,\"https://\")==0){return true}else{return false}}};t.appendTapParams=function(e,n,r){if(typeof n==\"undefined\"||n==null){return e}if(typeof r==\"undefined\"||r==null){return e}if(t.isHttpUrl(e)){if(t.matchString(e,\"?\")==-1){e+=\"?\"+\"u-tap-o=\"+n+\",\"+r}else{e+=\"&\"+\"u-tap-o=\"+n+\",\"+r}}return e};t.performAdClick=function(e,n){n=n||event;if(typeof e==\"undefined\"||e==null){t.log(\" invalid config, nothing to process .\");this.broadcastEvent(\"error\",\"invalid config, nothing to process .\");return}var r=e.clickConfig;var i=e.landingConfig;if((typeof r==\"undefined\"||r==null)&&(typeof i==\"undefined\"||i==null)){t.log(\"click/landing config are invalid, Nothing to process .\");t.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");return}var s=null;var o=null;var u=null;var a=null;var f=null;var l=null;var c=null;if(typeof n!=\"undefined\"&&n!=null){a=n.screenX;f=n.screenY}if(typeof i==\"undefined\"||i==null){l=r.url;c=r.urlType}else if(typeof r==\"undefined\"||r==null){l=i.url;c=i.urlType}else{l=i.url;c=i.urlType;s=r.url;o=r.pingWV;u=r.fr}var h=t.getPlatform();try{if(typeof u!=\"boolean\"&&typeof u!=\"number\"||u==null){u=true}if(u<0||u>1){u=true}if(typeof o!=\"boolean\"&&typeof o!=\"number\"||o==null){o=true}if(o<0||o>1){o=true}if(typeof c!=\"number\"||c==null){c=0}s=t.appendTapParams(s,a,f);if(typeof s!=\"undefined\"&&s!=null){if(o==true){t.pingInWebView(s)}else{t.ping(s,u)}}else{t.log(\"clickurl provided is null.\")}if(typeof l!=\"undefined\"&&l!=null){if(typeof s==\"undefined\"||s==null){l=t.appendTapParams(l,a,f)}switch(c){case 1:{t.openEmbedded(l)}break;case 2:{if(h==\"ios\"){t.ios.openItunesProductView(l)}else{t.broadcastEvent(\"error\",\"Cannot process openItunesProductView for os\"+h)}}break;default:{t.openExternal(l)}}}else{t.log(\"Landing url provided is null.\")}}catch(p){t.log(\"Perform ad click exception.\"+p)}};t.getVersion=function(){return\"1.0\"};t.getPlatform=function(){return e.getPlatform()};t.getPlatformVersion=function(){return e.getPlatformVersion()};t.log=function(t){e.log(t)};t.openEmbedded=function(t){e.openEmbedded(t)};t.openExternal=function(t){e.openExternal(t)};t.ping=function(t,n){e.ping(t,n)};t.pingInWebView=function(t){e.pingInWebView(t)};t.ios.openItunesProductView=function(t){e.ios.openItunesProductView(t)}})()"

    goto :goto_0
.end method
